package org.bjf.springboot.service;

import java.util.List;
import javax.annotation.Resource;
import org.bjf.springboot.domain.User;
import org.bjf.springboot.mapper.UserMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * Created by binjinfeng on 2017/3/6.
 */
@Service
public class UserService {


  private final Logger logger = LoggerFactory.getLogger(this.getClass());
  @Resource
  private UserMapper userMapper;

  public List<User> list() {
    List<User> users = userMapper.findAll();
    logger.info("users.size:" + users.size());

    return users;

  }

  public void add(User user) {
//        userMapper.save(user);
  }

  public User get(int id) {

//        User user = userMapper.findOne(id);
    User user = null;
    return user;
  }

}
